/**
  ******************************************************************************
  * @file    Bsp/Led.h 
  * @author  Zlf
  * @version V1.0.0
  * @date    2017-08-08
  * @brief   Header for Led.c module
  ******************************************************************************
  */

/* Define to prevent recursive inclusion -------------------------------------*/
#ifndef    __LED_H
#define    __LED_H

/* Includes ------------------------------------------------------------------*/
	#include "main.h"

/* Exported types ------------------------------------------------------------*/
typedef  struct{
	void (* init)(void);
}F_LED_Typedef;

/* Exported constants --------------------------------------------------------*/

#define LED_GPIO  	  	( GPIOB )
#define LED_ASTP_PIN 	( GPIO_Pin_12 ) //S7
#define LED_AERR_PIN 	( GPIO_Pin_15 ) //S1
#define LED_AESC_PIN 	( GPIO_Pin_13 ) //S5
#define LED_ARUN_PIN	( GPIO_Pin_14 ) //S3

/* Exported macro ------------------------------------------------------------*/

#define LED_ARUN_ON			( GPIO_ResetBits(LED_GPIO, LED_ARUN_PIN) )
#define LED_ARUN_OFF		( GPIO_SetBits(LED_GPIO, LED_ARUN_PIN) )
#define LED_ARUN_TOG		( GPIO_ToggleBits(LED_GPIO, LED_ARUN_PIN) )
			
#define LED_AERR_ON			( GPIO_ResetBits(LED_GPIO, LED_AERR_PIN) )
#define LED_AERR_OFF		( GPIO_SetBits(LED_GPIO, LED_AERR_PIN) )
#define LED_AERR_TOG		( GPIO_ToggleBits(LED_GPIO, LED_AERR_PIN) )

#define LED_ASTP_ON			( GPIO_ResetBits(LED_GPIO, LED_ASTP_PIN) )
#define LED_ASTP_OFF		( GPIO_SetBits(LED_GPIO, LED_ASTP_PIN) )
#define LED_ASTP_TOG		( GPIO_ToggleBits(LED_GPIO, LED_ASTP_PIN) )

#define LED_AESC_ON			( GPIO_ResetBits(LED_GPIO, LED_AESC_PIN) )
#define LED_AESC_OFF		( GPIO_SetBits(LED_GPIO, LED_AESC_PIN) )
#define LED_AESC_TOG		( GPIO_ToggleBits(LED_GPIO, LED_AESC_PIN) )

/* Exported varables --------------------------------------------------------*/
extern F_LED_Typedef fLed;

#endif /* __LED_H */
 

